// 图片地址
let image = "/admin/static/img/map/map-background.png";
// 动画速度
let speed = 5;
// 重复次数
let repeat = () => new Cesium.Cartesian2(5, 5);

export default {
	transparent: {
		name: "通用：透明",
		style: () => ({
			color: Cesium.Color.WHITE,
			opacity: 0.01,
		})
	},
	polygons100: {
		name: "通用：纯色颜色 ，也是默认的材质",
		style: () => ({
			color: Cesium.Color.WHITE,
			opacity: 1,
		})
	},
	areaBorder: {
		name: "省界线",
		style: () => ({
			color: "#b8cadf",
			opacity: 1,
			// "label": {
			// 	"text": "{name}",
			// 	"position": "center",
			// 	"font_size": 20,
			// 	"color": "#ffffff",
			// 	"outline": true,
			// 	"outlineColor": "#000000",
			// 	"scaleByDistance": true,
			// 	"scaleByDistance_far": 60000000,
			// 	"scaleByDistance_farValue": 0.2,
			// 	"scaleByDistance_near": 1000000,
			// 	"scaleByDistance_nearValue": 1,
			// 	"distanceDisplayCondition": true,
			// 	"distanceDisplayCondition_far": 12000000,
			// 	"distanceDisplayCondition_near": 0
			// }
		})
	},
	polygons101: {
		name: "面状：图片",
		style: () => ({
			opacity: 1,
			materialType: mars3d.MaterialType.Image,
			materialOptions: {
				image,
				speed,
				repeat: repeat(),
				color: "red"
			},
		})
	},
	polygons102: {
		name: "面状：棋盘",
		style: () => ({
			opacity: 1,
			materialType: mars3d.MaterialType.Checkerboard,
			materialOptions: {
				lightColor: Cesium.Color.WHITE,
				darkColor: Cesium.Color.BLACK,
				repeat: repeat()
			}
		})
	},
	polygons103: {
		name: "圆形: 扫描半径（没有效果）",
		style: () => ({
			opacity: 1,
			materialType: mars3d.MaterialType.CircleScan,
			materialOptions: {
				image,
				color: new Cesium.Color(1.0, 0.0, 0.0, 1.0),
			}
		})
	},
	polygons104: {
		name: "圆形: 波纹扩散",
		style: () => ({
			opacity: 1,
			materialType: mars3d.MaterialType.CircleWave,
			materialOptions: {
				speed,
				// 圆圈数量
				count: 2,
				// 虚化效果
				gradient: 1,
				// 颜色
				color: new Cesium.Color(1.0, 0.0, 0.0, 1.0),
			}
		})
	},
	polygons105: {
		name: "线状: 数字流动线",
		style: () => ({
			opacity: 1,
			materialType: mars3d.MaterialType.DigitalFlow,
			materialOptions: {
				image,
				speed,
				// 高亮强度
				glow: 10,
				// 流动高亮强度
				flowGlow: 1,
				// 分段数
				segment: 3,
				// 颜色
				color: new Cesium.Color(1.0, 0.0, 0.0, 1.0),
			}
		})
	},
	polygons106: {
		name: "球体: 电弧球体",
		style: () => ({
			opacity: 1,
			materialType: mars3d.MaterialType.EllipsoidElectric,
			materialOptions: {
				speed,
				// 颜色
				color: new Cesium.Color(1.0, 0.0, 0.0, 1.0),
			}
		})
	},
	polygons107: {
		name: "球体: 波纹球体",
		style: () => ({
			opacity: 1,
			materialType: mars3d.MaterialType.EllipsoidWave,
			materialOptions: {
				speed,
				// 颜色
				color: new Cesium.Color(1.0, 0.0, 0.0, 1.0),
			}
		})
	},
	polygons108: {
		name: "面状：网格",
		style: () => ({
			opacity: 1,
			materialType: mars3d.MaterialType.Grid,
			materialOptions: {
				// 网格透明度
				cellAlpha: 0.1,
				// 颜色
				color: Cesium.Color.WHITE,
				// 网格线数量
				lineCount: new Cesium.Cartesian2(8, 8),
				// 网格宽度
				lineThickness: new Cesium.Cartesian2(1.0, 1.0),
				// 偏移量，沿每个轴的起始偏移量
				lineOffset: new Cesium.Cartesian2(0.0, 0.0),
			}
		})
	},
	polygons109: {
		name: "面状：霓虹灯材质",
		style: () => ({
			opacity: 1,
			materialType: mars3d.MaterialType.NeonLight,
			materialOptions: {
				// 颜色
				color: new Cesium.Color(2, 1, 0.0, 0.8),
				// 圈数量
				repeat: 30,
				// 每秒刷新次数
				frameRate: 60
			}
		})
	},
	polygons110: {
		name: "面状： 柏油路面效果",
		style: () => ({
			opacity: 1,
			materialType: mars3d.MaterialType.PolyAsphalt,
			materialOptions: {
				// 颜色
				color: new Cesium.Color(0.15, 0.15, 0.15, 1.0),
				// 块大小
				size: 0.02,
				// 粗糙度
				frequency: 0.2
			}
		})
	},
	polygons111: {
		name: "面状：混合",
		style: () => ({
			opacity: 1,
			materialType: mars3d.MaterialType.PolyBlob,
			materialOptions: {
				// 浅色颜色
				evenColor: new Cesium.Color(1.0, 1.0, 1.0, 0.5),
				// 深色颜色
				oddColor: new Cesium.Color(0.0, 0.0, 1.0, 0.5),
				// 频率
				frequency: 10
			}
		})
	},
	polygons112: {
		name: "面状：碎石面",
		style: () => ({
			opacity: 1,
			materialType: mars3d.MaterialType.PolyFacet,
			materialOptions: {
				// 浅色颜色
				evenColor: new Cesium.Color(0.25, 0.25, 0.25, 0.75),
				// 深色颜色
				oddColor: new Cesium.Color(0.75, 0.75, 0.75, 0.75),
				// 频率
				frequency: 10
			}
		})
	},
	polygons113: {
		name: "面状：渐变面",
		style: () => ({
			opacity: 1,
			materialType: mars3d.MaterialType.PolyGradient,
			materialOptions: {
				// 颜色
				color: "#2b92fb",
				// 透明度系数
				alphaPower: 1,
				// 漫射系数
				diffusePower: 0.8,
				// 渐变位置，默认在中心
				center: new Cesium.Cartesian2(0.5, 0.5),
			}
		})
	},
	polygons114: {
		name: "面状：草地面",
		style: () => ({
			opacity: 1,
			materialType: mars3d.MaterialType.PolyGrass,
			materialOptions: {
				// 浅色颜色
				evenColor: new Cesium.Color(0.25, 0.4, 0.1, 1.0),
				// 深色颜色
				oddColor: new Cesium.Color(0.1, 0.1, 0.1, 1.0),
				// 频率
				frequency: 1.5
			}
		})
	},
	polygons115: {
		name: "面状：木材面",
		style: () => ({
			opacity: 1,
			materialType: mars3d.MaterialType.PolyWood,
			materialOptions: {
				// 浅色颜色
				evenColor: new Cesium.Color(0.6, 0.3, 0.1, 1.0),
				// 深色颜色
				oddColor: new Cesium.Color(0.4, 0.2, 0.07, 1.0),
				// 频率
				frequency: 3.0,
				// 噪波比例
				noiseScale: new Cesium.Cartesian2(0.7, 0.5),
				// 颗粒的频率
				grainFrequency: 27.0
			}
		})
	},
	polygons116: {
		name: "圆形: 波纹雷达扫描",
		style: () => ({
			opacity: 1,
			materialType: mars3d.MaterialType.RadarWave,
			materialOptions: {
				color: new Cesium.Color(0.0, 1.0, 1.0, 0.7),
				speed
			}
		})
	},
	polygons117: {
		name: "矩形面： 轮播图",
		style: () => ({
			opacity: 1,
			materialType: mars3d.MaterialType.RectSlide,
			materialOptions: {
				image,
				color: Cesium.Color.WHITE,
				speed
			}
		})
	},
	polygons118: {
		name: "面状：条纹",
		style: () => ({
			opacity: 1,
			materialType: mars3d.MaterialType.Stripe,
			materialOptions: {
				evenColor: Cesium.Color.WHITE,
				oddColor: Cesium.Color.BLACK,
				// 重复次数
				repeat: 5,
				// 条纹方向
				orientation: Cesium.StripeOrientation.HORIZONTAL,
				// 其实位置
				offset: 0
			}
		})
	},
	polygons119: {
		name: "面状：文字贴图",
		style: (text = "默认文字内容") => ({
			opacity: 1,
			materialType: mars3d.MaterialType.Text,
			materialOptions: {
				text,
				font_size: 30,
				font_weight: "bold",
				color: new Cesium.Color(1.0, 1.0, 0.0, 1.0),
				// 是否描边
				stroke: true,
				// 描边颜色
				strokeColor: "red",
				// 描边宽度
				strokeWidth: 5,
				// 画布背景色
				// backgroundColor: "",
				padding: 100,
				// 文本的基线
				textBaseline: "top",
			}
		})
	},
	WallScroll: {
		name: "墙体: 走马灯效果",
		style: () => ({
			opacity: 1,
			materialType: mars3d.MaterialType.WallScroll,
			materialOptions: {
				image: Cesium.Material.DefaultImageId,
				color: new Cesium.Color(1.0, 0.0, 0.0, 0.7),
				count: 1,
				speed,
				// 方向往上，false是往下，true是往上
				reverse: false,
				// 是否泛光
				bloom: false,
				// 是否Y轴朝上
				axisY: false,
			}
		})
	},
	Water: {
		name: "面状：水面材质",
		style: () => ({
			opacity: 1,
			materialType: mars3d.MaterialType.Water,
			materialOptions: {
				// 图片路径，镜面反射纹理材质图片
				specularMap: image,
				// 图片路径，水正常扰动的法线图材质图片
				normalMap: Cesium.Material.DefaultImageId,
				// 基础颜色
				baseWaterColor: new Cesium.Color(0.2, 0.3, 0.6, 1.0),
				// 混合颜色，从水中混合到非水域时使用的rgba颜色对象
				blendColor: new Cesium.Color(0.0, 1.0, 0.699, 1.0),
				// 动画速度
				animationSpeed: 0.01,
				// 水波振幅
				amplitude: 10,
				// 镜面反射强度
				specularIntensity: 0.5,
				// 衰减因子
				fadeFactor: 1.0
			}
		})
	},
	WaterLight: {
		name: "面状：带蓝色光线波纹的水面材质",
		style: () => ({
			opacity: 1,
			materialType: mars3d.MaterialType.WaterLight,
			materialOptions: {
				// 图片路径，镜面反射纹理材质图片
				specularMap: image,
				// 图片路径，水正常扰动的法线图材质图片
				normalMap: Cesium.Material.DefaultImageId,
				// 透明度
				alpha: 0.2,
			}
		})
	},
	polygons201: {
		name: "线状: 泛光线",
		style: () => ({
			opacity: 1,
			width: 10,
			materialType: mars3d.MaterialType.LineBloom,
			materialOptions: {
				// 泛光强度
				glow: 8,
				// 颜色
				color: Cesium.Color.WHITE,
				// 速度
				speed: 1,
			}
		})
	},
	Image2: {
		name: "线状: 图片墙",
		style: () => ({
			materialType: mars3d.MaterialType.Image2,
			materialOptions: {
				image: "http://mars3d.cn/img/textures/fence-top.png",
				color: "#4881A7"
			}
		})
	},
	polygons202: {
		name: "线状: 闪烁线",
		style: () => ({
			opacity: 1,
			materialType: mars3d.MaterialType.LineFlicker,
			materialOptions: {
				// 颜色
				color: new Cesium.Color(1.0, 0.0, 0.0, 0.7),
				// 速度
				speed: 1,
			}
		})
	},
	polygons203: {
		name: "线状: 流动图片（适用于线和墙",
		style: () => ({
			opacity: 1,
			materialType: mars3d.MaterialType.LineFlow,
			materialOptions: {
				image,
				// 速度
				speed,
				// 颜色
				color: new Cesium.Color(1, 0, 0, 1.0),
				repeat: new Cesium.Cartesian2(1.0, 1.0),
			}
		})
	},
	polygons204: {
		name: "线状: 流动颜色",
		style: () => ({
			opacity: 1,
			width: 1,
			materialType: mars3d.MaterialType.LineFlowColor,
			materialOptions: {
				// 速度
				speed: 0.5,
				// 颜色
				color: "red",
				// 比例
				percent: 1,
				// 透明度
				alpha: 1,
				// 开始时间
				startTime: 0,
			}
		})
	},
	polygons205: {
		name: "线状: 轨迹线",
		style: () => ({
			opacity: 0.5,
			materialType: mars3d.MaterialType.LineTrail,
			materialOptions: {
				// 速度
				speed,
				// 颜色
				color: Cesium.Color.WHITE
			}
		})
	},
	polygons206: {
		name: "线状: OD线",
		style: () => ({
			opacity: 1,
			width: 5,
			materialType: mars3d.MaterialType.ODLine,
			materialOptions: {
				speed: 1,
				// 颜色
				color: Cesium.Color.WHITE,
				bgColor: "#7ed1ff",
				// 开始时间
				startTime: 0
			}
		})
	},
	polygons207: {
		name: "线状: 箭头",
		style: () => ({
			opacity: 1,
			materialType: mars3d.MaterialType.PolylineArrow,
			materialOptions: {
				color: Cesium.Color.WHITE,
			}
		})
	},
	polygons208: {
		name: "线状: 虚线(异常)",
		style: () => ({
			opacity: 1,
			materialType: mars3d.MaterialType.PolylineDash,
			materialOptions: {
				color: Cesium.Color.WHITE,
				// 虚线间隔颜色
				// gapColor: Cesium.Color.TRANSPARENT,
				// 虚线间隔长度，以像素为单位
				// dashLength: 16.0,
				// 指定的16位模式
				// dashPattern: 255.0
			}
		})
	},
	polygons209: {
		name: "线状: 高亮线",
		style: () => ({
			opacity: 0.5,
			width: 10,
			materialType: mars3d.MaterialType.PolylineGlow,
			materialOptions: {
				color: "#7ed1ff",
				opacity: 0.5,
				// 发光强度
				glowPower: 0.5,
				// 渐变效果强度,占总行长的百分比表示。如果1.0或更高，则不使用锥度效应。
				taperPower: 1
			}
		})
	},
	polygons210: {
		name: "线状: 衬色线",
		style: () => ({
			opacity: 1,
			materialType: mars3d.MaterialType.PolylineOutline,
			materialOptions: {
				color: Cesium.Color.WHITE,
				// 衬色颜色 
				outlineColor: Cesium.Color.BLACK,
				// 衬色宽度，以像素为单位
				outlineWidth: 1.0
			}
		})
	},
	polygons211: {
		name: "圆形: 雷达线 (圆+旋转半径线)",
		style: () => ({
			opacity: 1,
			materialType: mars3d.MaterialType.RadarLine,
			materialOptions: {
				color: new Cesium.Color(0.0, 1.0, 1.0, 0.7),
				speed
			}
		})
	},
	polygons212: {
		name: "圆形: 放大扩散线",
		style: () => ({
			opacity: 1,
			materialType: mars3d.MaterialType.ScanLine,
			materialOptions: {
				color: new Cesium.Color(1.0, 1.0, 0.0, 1.0),
				speed
			}
		})
	},
}
